“Path cost” 指“路径代价/路径成本”:在图(graph)或网络中,从一个节点到另一个节点所走“路径”的总花费,通常是把沿途边(edge)的权重相加得到(如距离、时间、费用、风险或能量消耗等)。在算法与路径规划中,它用来判断哪条路“更优”。(不同场景也可能用乘积、最大值等方式定义,但最常见是求和。)
/pæθ kɔːst/(英式); /pæθ kɑːst/(美式)
The algorithm chooses the route with the lowest path cost.
算法会选择路径代价最低的路线。
In a weighted graph, the path cost from A to D is the sum of the edge weights along the chosen path, so changing one edge weight can change the optimal route.
在加权图中,从 A 到 D 的路径代价等于所选路径上各边权重之和,因此只要改变一条边的权重,就可能改变最优路线。
“Path” 源自古英语 pæþ,意为“道路、小径”;“cost” 源自拉丁语 constare(“花费、付出代价”)经法语进入英语。组合成 “path cost” 后,多用于数学、计算机科学与工程领域,用来表达“走这条路径要付出的总成本”。